/******************************************************************************/
/* File: tcpTrafficSender.h                                                   */
/******************************************************************************/

#ifndef TCPTRAFFICSENDER_H
#define TCPTRAFFICSENDER_H

#include <time.h>
#include <sys/time.h>
#include "thread.h"
#include "dataStore.h"
#include "utilClass.h"
#include "socketClass.h"

class TCPTrafficSender : public Thread {
    
public:
    TCPTrafficSender(TCPSocket *pts, ThreadConf *ptc);
    ~TCPTrafficSender();
    
    void UploadReport(double begin, double end, int64_t transfer, double bandwidth);
    void ExitCleanUp();
    
    virtual void Run();
    
protected:
    TCPSocket *pTcpSock;
    ThreadConf *pThreadConf;
    char *pSendBuf;
    
    int iSendRate;
};

#endif

/******************************************************************************/
/* End File: tcpTrafficSender.h                                               */
/******************************************************************************/